package com.ali.protobuf.single;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * 自定义服务端处理器
 */
public class MyProtoBufSingleServerHandler extends SimpleChannelInboundHandler<UserPOJO.User> {
    /**
     * 通道读取
     */
    @Override
    protected void channelRead0(ChannelHandlerContext channelHandlerContext, UserPOJO.User user) {
        System.out.println("接收消息，id：" + user.getId() + "，code：" + user.getCode() + "，name：" + user.getName());
    }
}
